<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文件上传</title>
</head>
<style type="text/css">
    .inputclass {
        height:25px;
        width:150px;
    }
    .tableclass{
        border-collapse:separate;
        border-spacing:40px 58px;  /*第一个设置水平间距，而第二个设置垂直间距*/
        float: left;
        border: 0;
    }
</style>
<body>
    <form action="/doc/addDoc" id="myForm" method="post" enctype="multipart/form-data">
        <div class="ibox float-e-margins">
            <div class="ibox-content">
                <div class="form-horizontal">
                    <div class="row">
                        <input id="id" name="id" value="${item.id}" type="hidden"/>
                            <table class = "tableclass">
                                 <tr>
                                     <td>上传附件</td>
                                     <td><input type="file" name="file" id="file" class="inputclass"></td>
                                 </tr>
                                <tr>
                                    <td><input type ="submit" name="submit" value=" " style = "background:url(/static/img/tijiao.png);width: 90px; height: 45px" onclick="StandardInfoDlg.close()"/></td>
                                    <td><input type="button" style = "background:url(/static/img/quxiao.png);width: 90px; height: 45px" onclick="window.close()" /></td>
                             </table>
                    </div>
                </div>
            </div>
        </div>
     </form>
</body>
<script src="${ctxPath}/static/modular/standard/standard/standard_info.js"></script>

<!--因为有action的那个方法，所以进入的是action的方法，也就不是根据info_js那个方法，所以提交的方法设置关闭就好-->
<script>
    StandardInfoDlg.close = function() {
        /*Feng.success("上传成功!");
        window.parent.Standard.table.refresh();
        StandardInfoDlg.close();*/
            parent.layer.close(window.parent.Standard.layerIndex);
    }

    StandardInfoDlg.addSubmit = function() {
        this.clearData();
        this.collectData();

        //提交信息
        var ajax = new $ax(Feng.ctxPath + "/standard/add", function(data){
            /* $('#file').parents('form').attr('enctype', 'multipart/form-data').get(0).encoding = 'multipart/form-data';*/
            Feng.success("添加成功!");
            window.parent.Standard.table.refresh();
            StandardInfoDlg.close();
        },function(data){
            Feng.error("添加失败!" + data.responseJSON.message + "!");
        });
        ajax.set(this.standardInfoData);
        ajax.start();
    }
</script>
</html>